﻿#include<iostream>
using namespace std;
int main() {
	enum class EquipLv :short {
		normal = 10, armyA = normal,
		high, armyB = high,
		rare, armyC = rare,
		epic, armyD = epic,
		legend, armyE = legend,
		myth = 100, armyS = myth
	};

	EquipLv weaponCLv{ EquipLv::normal };
	EquipLv weaponDLv{ EquipLv::myth };

	short diff = (int)weaponDLv - (int)weaponCLv;
	cout << "品质差：" << diff;

	weaponDLv = EquipLv::rare;
}

//枚举类型默认int
//成员只能是整数类型，不能是float等
//枚举类型和其他类型转换需要强制转换
//默认情况下，枚举类型的下一个项的初始值是上一个项的初始值+1